<% 
import ycoa.data.classes.ClassFactory 
import ycoa.data.classes.Class
import groovy.xml.StreamingMarkupBuilder

  def classFactory = ClassFactory.getInstance()
 
  def classes = classFactory.queryBySession()

  response.setContentType("text/xml")

  def sb = new StringBuilder()
  sb << "<root>"
  classes.each() { record -> 
    def cls = record as Class
    sb << cls.toXmlString() 
  }
  sb << "</root>"
  println sb.toString()

%>
